Page({

  data: {
    imgUri: getApp().globalData.imgUri,
    cdn: getApp().globalData.cdn,
    detail: {}
  },
  onLoad(e) {
    let item = wx.getStorageSync('gemoPickItem') || null
    if (item) {
      this.setData({
        detail:item
      })
    }
  },
  startExchange() {
    let { detail } = this.data
    console.log(detail,'--------')
    if (detail.jumpType == "INNER_APP") { //内部小程序
      wx.navigateTo({
        url: detail.jumpParam,
      });
    } else if (detail.jumpType == "OUT_APP") { //外部小程序
      wx.navigateToMiniProgram({
        appId: detail.jumpAppid,
        path: detail.jumpParam
      });
    } else if (detail.jumpType == "WEB_H5") { //
      wx.navigateTo({
        url: '/shop/webview/webview?webSrc=' + detail.jumpParam,
      })
    }
  },
  onShareAppMessage() {
    return {
      title: getApp().globalData.share_title,
      path: getApp().globalData.share_url,
      imageUrl: getApp().globalData.share_image,
    }
  }
})